package team.bailan.entity.domain;

public class RoomLevel {

    public static String ROOM_NOVICE = "ROOM_NOVICE";               // 新手场

    public static String ROOM_PRIMARY = "ROOM_PRIMARY";             // 初级场

    public static String ROOM_INTERMEDIATE = "ROOM_INTERMEDIATE";   // 中级场

    public static String ROOM_ADVANCED = "ROOM_ADVANCED";           // 高级场

    public static String ROOM_MASTER = "ROOM_MASTER";               // 大师场

    public static String ROOM_KING = "ROOM_KING";                   // 王者场

    public static int getRoomFactor(String roomLevel) {
        switch (roomLevel) {
            case "ROOM_NOVICE":
                return 10;
            case "ROOM_PRIMARY":
                return 25;
            case "ROOM_INTERMEDIATE":
                return 60;
            case "ROOM_ADVANCED":
                return 150;
            case "ROOM_MASTER":
                return 400;
            case "ROOM_KING":
                return 1000;
            default:
                return 0;
        }
    }

    public static int getTicket(String roomLevel) {
        switch (roomLevel) {
            case "ROOM_NOVICE":
                return 250;
            case "ROOM_PRIMARY":
                return 400;
            case "ROOM_INTERMEDIATE":
                return 900;
            case "ROOM_ADVANCED":
                return 2000;
            case "ROOM_MASTER":
                return 5000;
            case "ROOM_KING":
                return 10000;
            default:
                return 0;
        }
    }

    public static int getMaxBeans(String roomLevel) {
        switch (roomLevel) {
            case "ROOM_NOVICE":
                return 9600;
            case "ROOM_PRIMARY":
                return 50000;
            case "ROOM_INTERMEDIATE":
                return 120000;
            case "ROOM_ADVANCED":
                return 240000;
            case "ROOM_MASTER":
                return 800000;
            case "ROOM_KING":
                return 2000000;
            default:
                return 0;
        }
    }

    public static String getRoomLevel(int roomId) {
        if (roomId >= 0 && roomId < 10) {
            return ROOM_NOVICE;
        } else if (roomId >= 10 && roomId < 20) {
            return ROOM_PRIMARY;
        } else if (roomId >= 20 && roomId < 30) {
            return ROOM_INTERMEDIATE;
        } else if (roomId >= 30 && roomId < 40) {
            return ROOM_ADVANCED;
        } else if (roomId >= 40 && roomId < 50) {
            return ROOM_MASTER;
        } else {
            return ROOM_KING;
        }
    }
}
